package com.ftg.learn.day09.pattern.prototype;

/**
 * @author 布衣
 */
public class TestLion {

    public static void main(String[] args) throws CloneNotSupportedException {
        Lion l = new Lion("辛巴");

        l.info();
        //l.clone() 向上成父类  子类(Lion) l.clone()
        Lion o = (Lion) l.clone();
        o.info();


        System.out.println(l);
        System.out.println(l.clone());
        System.out.println(l == l.clone());
    }

}
